#ifndef UFBASE_H
#define UFBASE_H
#include <vector>
#include <utility>

class UFBase
{
public:
    UFBase(int n);
    virtual int find(int sites) = 0;

    virtual void unionSites(int s1,int s2) = 0;


    bool isConnected(int s1, int s2);

    int componentCount();

protected:
    typedef std::pair<int,int> SitesPair;


    int count;
    std::vector<int> id;

};

#endif // UFBASE_H
